#ifndef _SERVER_SERVICE_H_
#define _SERVER_SERVICE_H_

#include "rtask.h"

#include <iostream>
#include <vector>
#include <queue>
#include <map>
using namespace std ;

extern string gs_server_ip ;
extern short gsh_server_port;

class server_service
{
	private :
		server_service();		
		virtual ~server_service() ;

		server_service(const server_service&);
		server_service& operator=(const server_service&);
		
		rtask m_task;

	public:
		static server_service& _instance()
		{
			static server_service instance ;
			return instance ;
		}
		
		bool start() ;
		
		bool connect();
		void del_task(rtask& r_task) ;
		bool write(const string& s_data);
} ;

#endif

